
#include "mem_pool.h"

int unit_test()
{  
  CMem_Pool m_memPool;
    mempool *pool =(mempool*)m_memPool.MemPoolCreate(1);  
  
    while(1) {  
        long * tmp = (long*)m_memPool.mempool_allocate(pool,sizeof(long));   
        if (NULL == tmp) {  
            printf("no space in mempool , destroy it !!!");  
            m_memPool.mempool_destroy(pool);  
            break;    
        }         
    }  
  
    return 0;  
}  